<?php
/**
 * @package WordPress
 * @subpackage Carbon_Paper
 */

// Do not delete these lines
	if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
		die ('Please do not load this page directly. Thanks!');

	if ( post_password_required() ) { ?>
		<p class="nocomments">Ce post est prot&eacute;g&eacute; par un mot de passe. Entrez le mot pour afficher les commentaires.</p>
	<?php
		return;
	}
?>

<!-- You can start editing here. -->

<?php if ( have_comments() ) : ?>
	<a name="remarks"></a>
	<div id="remarks">
		<h3> 
			<span class="notation">Commentaires<a name="comments"/></span>&nbsp;
			<?php if ('open' == $post->comment_status) : comments_number('', 'Un commentaire sur ce post. <a href="#respond">Commentez cet article ci-dessous.</a>', '% commentaires au total sur ce post. <a href="#respond">Commentez cet article ci-dessous.</a>' ); endif; ?>
		</h3> 
		<?php foreach ($comments as $comment) : ?>
		<div class="remarks-lead"> 
			<div class="remarks-date"> 
				<b style="text-transform:capitalize"><?php comment_date('D j M Y') ?></b> &agrave; <?php comment_time('H:m') ?> <?php edit_comment_link('edit','&nbsp;&nbsp;',''); ?><br />
				<?php comment_author_link() ?>
			</div>
			<?php if ($comment->comment_approved == '0') : ?>
			<em>Votre commentaire est en attente de mod&eacute;ration.</em>
			<?php endif; ?>
		       <?php comment_text() ?>
			<div class="clear"></div>
		</div><!-- /.remarks-lead -->
		<?php endforeach; /* end for each comment */ ?>

		<!--<div class="navigation">
			<div class="alignleft"><span><?php previous_comments_link() ?></span></div>
			<div class="alignright"><span><?php next_comments_link() ?></span></div>
		</div>-->
	</div><!-- /.remarks -->
<?php else : // this is displayed if there are no comments so far ?>
	<?php if ('open' == $post->comment_status) : ?>
		<!-- If comments are open, but there are no comments. -->
	<?php else : // comments are closed ?>
		<!-- If comments are closed.
		<p class="nocomments">Les commentaires sont clos.</p>
                -->
	<?php endif; ?>
<?php endif; ?>

<?php if ('open' == $post->comment_status) : ?>

<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
<p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">logged in</a> to post a comment.</p>
<?php else : ?>

<div class="add-remarks">

<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post"  id='comment_form' >

<h3>Commentez<a name="respond"/></h3>
<?php if ( $user_ID ) : ?>

<div class="guidelines">Connect&eacute; en tant que <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="D&eacute;connection de votre compte"> &raquo;</a></div>

<?php else : ?>

<div class="guidelines"></div>

<div class="add-lead">
	<label for="author">Nom</label>
	<div><input type="text" name="author" id="name" value="<?php echo $comment_author; ?>" size="3" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> /><span><?php if ($req) echo "Votre nom est requis"; ?></span></div>
	<div class="clear"></div>
</div><!-- /.add-lead -->


<div class="add-lead">
	<label for="email">Email</label>
	<div><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="3" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> /><span><?php if ($req) echo "Une address email est requise"; ?></span></div>
	<div class="clear"></div>
</div><!-- /.add-lead -->

<div class="add-lead">
	<label for="url">Site Web</label>
	<input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="3" tabindex="3" />
	<div class="clear"></div>
</div><!-- /.add-lead -->

<?php endif; ?>

<!--<p><small><strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ?></code></small></p>-->

<div class="add-lead">
	<label class="your-remarks">Commentaires</label>
	<textarea name="comment" cols="40" rows="10" tabindex="4" class="your-remarks"></textarea>
</div><!-- /.add-lead -->

<div class="add-last-lead">
	<label>Envoyer</label>
	<span><input name="submit" type="submit" id="submit" tabindex="5" value="Envoyer" /></span>
</div><!-- /.add-lead -->


<?php comment_id_fields(); ?>

<?php do_action('comment_form', $post->ID); ?>

</form>

</div><!-- /.add-remarks -->


<?php endif; // If registration required and not logged in ?>

<?php endif; // if you delete this the sky will fall on your head ?>
